<!DOCTYPE html>
<html lang="en">
<head>
    <title>wer</title>
    <script src="/lib/plupload-2.1.2/js/jquery.min.js"></script>
    <script>
        $(function () {
            $("#upload").click(function () {

                var formData = new FormData();
                formData.append("name", );
                formData.append("key", );
                formData.append("policy", );
                formData.append("OSSAccessKeyId", );
                formData.append("success_action_status", );
                formData.append("callback", );
                formData.append("signature", );
                $.ajax({
                    url: "http://my-first-bk2.oss-cn-hangzhou.aliyuncs.com/",
                    type: "POST",
                    data: formData,
                    /**
                     *必须false才会自动加上正确的Content-Type
                     */
                    contentType: false,
                    /**
                     * 必须false才会避开jQuery对 formdata 的默认处理
                     * XMLHttpRequest会对 formdata 进行正确的处理
                     */
                    processData: false,
                    success: function (data) {
                        if (data.status === "true") {
                            alert("上传成功！");
                        }
                        if (data.status === "error") {
                            alert(data.msg);
                        }
                    },
                    error: function () {
                        alert("上传失败！");

                    }
                });
            });
        });
    </script>
</head>
<body>
选择文件:<input type="file" id="file1" /><br />
<input type="button" id="upload" value="上传" />
</body>
</html>